<template>
  <div>
    <ul>
      <li>
        <router-link to="/newsdetail/2001/hangzhou">
          杭州第19届亚运会开始了
        </router-link>
      </li>
      <li>星巴克CEO评价酱香拿铁</li>
      <li>俄罗斯总统普京会见王毅</li>
    </ul>
    <p>
      count2 is {{ count2 }}
      <button @click="count2++">+</button>
    </p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      count2: 1
    }
  },
  // 当前能看到它了
  activated () {
    console.log('---NewsList---activated')
  },
  // 失活，只是暂时看不到，没有销毁
  deactivated () {
    console.log('---NewsList---deactivated')
  },
  beforeDestroy () {
    console.log('---NewsList---beforeDestroy')
  },
  destroyed () {
    console.log('---NewsList---destroyed')
  }
}
</script>
